<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>

<script type="text/javascript">
	$(function() {
		$("#tabs").tabs({
			selected : 0,
			disabled : [ 1, 2, 3, 4, 5 ]
		});
	});

	function preloader() {
		document.getElementById("loading").style.display = "none";
	}
	window.onload = preloader;

	function onLinkClick() {
		document.getElementById("Button1").style.display = "none";
		document.getElementById("Button2").style.display = "none";
		document.getElementById("loading").style.display = "block";
	}
</script>

</head>
<body>
	<div>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1"><font
						style="font-size: 20px; color: #FFAD00;">1</font>&nbsp;<font
						style="font-size: 12px">Select Tables</font></a></li>
				<!-- 0 -->
				<li><a href="#tabs-2"><font style="font-size: 20px;">2</font>&nbsp;<font
						style="font-size: 12px">Select Columns</font></a></li>
				<!-- 1 -->
				<li><a href="#tabs-2.5"><font style="font-size: 20px;">3</font>&nbsp;<font
						style="font-size: 12px">Choice</font></a></li>
				<!-- 2 -->
				<li><a href="#tabs-3"><font style="font-size: 20px;">4</font>&nbsp;<font
						style="font-size: 12px">Select Filters</font></a></li>
				<!-- 3 -->
				<li><a href="#tabs-4"><font style="font-size: 20px;">5</font>&nbsp;<font
						style="font-size: 12px">View Query</font></a></li>
				<!-- 4 -->
				<li><a href="#tabs-5"><font style="font-size: 20px;">6</font>&nbsp;<font
						style="font-size: 12px">Query Results</font></a></li>
				<!-- 5 -->
			</ul>

			<!-- ================ Step-1 tab content================ -->
			<div id="tabs-1">

				<s:form method="post">
					<s:if test="nodesList.size()!=0">

						<br />
						<table class="table table-striped table-bordered">

							<tr>
								<th>Select</th>
								<th>Information Regarding</th>
							</tr>
							<s:iterator value="nodesList">
								<tr>
									<td><s:checkbox name="checkTable"
											fieldValue="%{tblObj.name}"
											value="%{tblObj.name in checkTable}" theme="simple" /></td>
									<td><s:property value="tblObj.name" /></td>
								</tr>
							</s:iterator>
						</table>
					</s:if>

					<s:if test="nodesList.size()==0">
						<br />
						<br />
						<br />
						<div class="alert alert-info" align="center">

							<button type="button" class="close" data-dismiss="alert"></button>
							<font size="3" color="orange"><b>The Database has no
									tables.</b></font>

						</div>
					</s:if>

					<!-- This is the loader window -->
					<div id="loading" style="display: none" align="center"></div>
					
					<!-- 'Submit' button -->
					<s:submit cssClass="btn btn-primary" value="Next" align="left"
						action="step1_5" id="Button1" onclick="onLinkClick()" />

					<s:submit cssClass="btn btn-danger" value="Quit" align="right"
						action="RestartWork" id="Button2" />

				</s:form>
			</div>
		</div>
	</div>
</body>
</html>